#include <iostream>
#include <vector>
#include <string>
#include <cstring>
#include <algorithm>
#include <map>
#include <climits>

using namespace std;

vector<string> split(const string &s,const string &d){
     vector<string> ans;
     string ss=s;
     int index=0;
     while((index=ss.find(d))!=string::npos){
         string t=ss.substr(0,index);
         ans.push_back(t);
         index+=d.size();
         ss=ss.substr(index);
         
        // cout <<ss<< endl;
        
     }
     ans.push_back(ss);
    return ans;
}

int main(){
    string s;
    int n;
    cin >> s;
    cin >> n;
    auto v=split(s,",");
    for(auto x:v){
        cout << x << " ";
    }cout <<endl;


    return 0;
}